﻿using System;
using System.Xml.Serialization;
using JetBrains.Application.License2.LicenseServerSupport;

namespace ResharperKeygen;

[Serializable]
[XmlRoot("ObtainTicketResponse")]
public class ObtainTicketResponse : IntranetLicenseServerResponse
{
    [XmlElement("ticketId")]
    public string TicketId { get; set; } = Guid.NewGuid().ToString();
    [XmlElement("ticketProperties")]
    public string TicketProperties { get; set; }
    [XmlElement("prolongationPeriod")]
    public long ProlongationPeriod { get; set; } = int.MaxValue - 1;

    [XmlElement("action")]
    public override string Action { get; set; } = "obtainTicket.action";
    [XmlElement("responseCode")]
    public override ResponseCode ResponseCode { get; set; } = ResponseCode.OK;
}